Recalculate Process

Use the Recalculate API process to recalculate data in a project file.

Process Settings

Below are the settings you must define for the Recalculate API process:

Setting Description Sample Value
ProcessID This ID informs Cobra to run the Recalculate process. Recalc
Project This setting refers to the project where you want to run the recalculate process. Demo Advanced
ClassList This setting contains the list of cost classes to recalculate.

This setting is required.

Budget,OTB
Criteria Use this setting to choose the selection criterion you want to use for the recalculate process. The selection criteria change based on the project. Some selection criteria include the following:
  • Control Account
  • Work Package
  • Resources
  • Codes
  • WP
  • Total Project

The options are case sensitive.

This setting is optional and the default value is Total Project.

Control Account
IncludeChildren Use this setting to specify whether the selected criterion should include child elements or not.

This setting is optional and the default value is 0.

1
Selection Use this setting to select the portion of the project for the recalc. The available choices depend on the selections you made in the Criteria settings.

If you select Total Project for the Criteria setting, the Selection setting is left blank.

1.1
Scope Use one of the following values:
  • All — Use this value to recalculate all selected costs regardless of their status. Recalculation applies to historical data.
  • Remaining — Use this value to recalculate from the status date forward without changing historical data.
  • DateRange — Use this value to set the date range when Cobra should recalculate. You must specify the StartDateLabel and EndDateLabel settings if you use this value.

    This setting is required and the default value is All.

DateRange
StartDateLabel Use this setting if setting Scope=DateRange.

This setting refers to a valid calendar label in calendar set 00 and is the starting date for the DateRange option the calculation process is to execute.

This setting is only required if the Scope=All setting is not defined or missing from the API script.

JAN07
EndDateLabel Use this setting if setting Scope=DateRange.

This setting refers to a valid calendar label in calendar set 00 and is the end date for the DateRange option the calculation process is to execute.

This setting is only required if the Scope=All setting is not defined or missing from the API script.

APR07
ResultList This setting is the result used to recalculate the total and available costs. This is a required parameter and must be specified.

This setting is case sensitive.

OVERHEAD,GANDA
AllowComplete Use this setting to indicate whether you want to recalculate completed control accounts and work packages or not.

This setting is optional and the default value is the value set in the Allow recalculation of completed Control Accounts and Work Packages option in the Recalc Preferences tab of the Project Properties dialog box.

1
AllowReadOnlyClasses Use this setting to indicate whether to recalculate read-only classes or not.

This setting is optional and the default value is the value set in the Allow Recalc on classes not editable in the time-phase grid option in the Recalc Preferences tab of the Project Properties dialog box.

1
ReplaceResults

This setting determines whether Cobra uses a rate of 1 or 0 when performing calculations and a required rate is not found.

If ReplaceResults = 1 (True), Cobra uses a rate of 1 when there is a missing rate.

If ReplaceResults = 0 (False), Cobra uses a rate of 0 when there is a missing rate.

If this setting is not specified, Cobra uses a rate of 0 when there is a missing rate.

1

Sample Script

Below is a sample script file for the Recalculate API process:

[Process001]

ProcessID=Recalc

Project=Demo Advanced

Criteria=Control Account

IncludeChildren=0

Selection=1.1

Scope=All

StartDateLabel=JAN07

EndDateLabel=APR07

ClassList=Budget,OTB

ResultList= OVERHEAD,GANDA

AllowComplete=0

AllowReadOnlyClasses=0

ReplaceResults=1